home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 27 / CU Amiga Magazine's Super CD-ROM 27 (1998)(EMAP Images)(GB)[!][issue 1998-10].iso / CUCD / Programming / JForth / JTools / JReq / req_support.f < prev    next >
Encoding:
FORTH Source  |  1991-06-05  |  1.2 KB  |  53 lines

  1. \ Support for the Cygnus Ed Requester Library
  2. \ REQ.LIBRARY is a library that can be used in your applications
  3. \ without royalties.  The only requirement is that you include
  4. \ proper credit and the documentation with the library.
  5. \ The complete system is available on Fred Fish disk #419
  6. \
  7. \ This JForth interface was developed by:
  8. \    John Gangell, Martin Kees, and Phil Burk
  9.  
  10. getmodule includes
  11. include? findtask() ju:exec_support
  12. include? ReqFileRequester  JREQ:ReqBase.j
  13.  
  14. ANEW TASK-REQ_SUPPORT.f
  15.  
  16. \ Declare the Library control words
  17. :LIBRARY REQ
  18.  
  19. : REQ? req_name req_lib lib?
  20. ;
  21.  
  22. : -REQ req_lib -lib
  23. ;
  24. \ ----------------------------------------------
  25.  
  26. \ Support for setting and restoring the pr_windowptr
  27. variable old-windowptr
  28.  
  29. : SET.WINDOWPTR  ( window -- oldwindowptr )
  30.     0 findtask() dup s@ pr_windowptr >r
  31.     s! pr_windowptr
  32.     r>
  33. ;
  34.  
  35. : ColorRequester()  ( color -- result )
  36.   call req_lib ColorRequester w->s
  37. ;
  38.  
  39. : GetString() ( buf title wind visible maxc --- flag )
  40.   >r >r >r >r
  41.   >abs 
  42.   r> >abs r> if>abs r> r> call req_lib getstring
  43. ;
  44.  
  45. : FileRequester() ( frstruct -- success)
  46.   call>abs req_lib FileRequester
  47. ;
  48.  
  49. : TextRequest()    ( add of TRstructure -- 1|2|0 )    \ Tested Aok
  50.     call>abs req_lib textrequest
  51. ;
  52.  
  53.